package com.rainman.simpleredis.core.config;

import com.rainman.simpleredis.core.delay_work.SimpleDelayWorkerInterface;
import com.rainman.simpleredis.core.process_flow.SimpleProcessFlowWorkerInterface;
import com.rainman.simpleredis.core.scheduled.SimpleScheduledWorkerInterface;
import com.rainman.simpleredis.core.simplemq.SimpleMqWorkerInterface;
import lombok.Data;

import java.util.HashMap;
import java.util.List;

/**
 * 配置
 *
 */
@Data
public class SimpleRedisConfig {

    /**
     * 键头
     */
    private String keyHead="SR";

    /**
     * 分布式锁头
     */
    private String distributedLockHead="Dlock";

    /**
     * 分布式缓存头
     */
    private String distributedCacheHead="DCache";

    /**
     * 消息版本，高版本的消息。不会被低版本的消费者消费
     */
    private Long ver=0L;

    /**
     * 区分项目，如果多项目公用一个redis的时候使用
     */
    private Integer product=0;

    /**
     * 编码
     */
    private String charset="UTF-8";


    /**
     * 消费者接口实现
     */
    private List<SimpleMqWorkerInterface> mqWorkerInterfaces;

    /**
     * 定时任务接口实现
     */
    private HashMap<String,SimpleScheduledWorkerInterface> scheduledWorkerInterfacesMap;

    /**
     * 流式任务接口实现
     */
    private HashMap<String, SimpleProcessFlowWorkerInterface> flowWorkerInterfaceHashMap;

    /**
     * redis操作
     */
    private RedisInterface redisInterface;

    /**
     * 延时任务，持久化实现接口
     *
     */
    private SimpleDelayWorkDataInterface simpleDelayWorkDataInterface;

    private SimpleDelayWorkerInterface simpleDelayWorkerInterface;


}
